package en.edu.cuit.aumalls.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface OrderDetailMapper {
	
	@Select("select detail_goods from order_detail where detail_order = #{order_id} LIMIT 1")
	int findGoodsIdByOrderId(@Param("order_id") String order_id);

	@Select("select detail_goods from order_detail")
	List<Integer> findDetailGoods();
	
	@Select("select count(*) from order_detail where detail_goods = #{detail_goods}")
	int countByDetailGoods(@Param("detail_goods") int detail_goods);
}
